<%@ Page Language="C#" MasterPageFile="~/IPMSMasterPage.master" AutoEventWireup="true" 
CodeFile="OptHeadingSetTmplt.aspx.cs" Inherits="OptHeadingSetTmplt" title="Project Monitoring System" 
culture="auto:en-US" uiculture="auto" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server" Visible="false">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <asp:ObjectDataSource ID="ODSHeadingSetTmplt" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetHeadingSetTemplateData"
        TypeName="IPTableAdapters.HeadingSetTemplateTableAdapter" DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_HeadingSet" Type="String" />
            <asp:Parameter Name="Original_HeadingCode" Type="String" />
            <asp:Parameter Name="Original_Section" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Section" Type="Int32" />
            <asp:Parameter Name="UpdateBy" Type="String" />
            <asp:Parameter Name="OwnerGroupID" Type="String" />
            <asp:Parameter Name="Original_HeadingSet" Type="String" />
            <asp:Parameter Name="Original_HeadingCode" Type="String" />
            <asp:Parameter Name="Original_Section" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="HeadingSet" Type="String" />
            <asp:Parameter Name="HeadingCode" Type="String" />
            <asp:Parameter Name="Section" Type="Int32" />
            <asp:Parameter Name="CreateBy" Type="String" />
            <asp:Parameter Name="UpdateBy" Type="String" />
            <asp:Parameter Name="OwnerGroupID" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <div style="margin-left:10px;margin-right:10px;">
        <asp:Panel ID="SearchPanel" runat="server" >
            <fieldset>
                 <legend><asp:Label ID="lblSearch" runat="server" Text="Search" meta:resourcekey="lblSearchResource1"></asp:Label></legend>
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lblSearchProcSet" runat="server" Text="Procedure Set:" meta:resourcekey="lblHeadingSetResource1"/>
                        </td>
                        <td width="10"></td>
                        <td>
                            <asp:TextBox ID="txtSearchProcSet" runat="server"/>
                        </td>
                        <td width="10"></td>
                        <td>
                            <asp:Label ID="lblSearchProcCode" runat="server" Text="Procedure Code:" meta:resourcekey="lblHeadingCodeResource1"/>
                        </td>
                        <td width="10"></td>
                        <td>
                            <asp:TextBox ID="txtSearchEProcCode" runat="server"/>
                        </td>
                        <td width="10"></td>
                        <td>
                            <asp:Button ID="btnSearch" runat="server" Text="Search" CausesValidation="false" meta:resourcekey="btnSearch" OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
            </fieldset>
        </asp:Panel>
        <fieldset>
            <legend><asp:Label ID="lblEdit" runat="server" Text="Edit Procedure Template" meta:resourcekey="lblEditResource1"></asp:Label></legend>
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lblHeadingSet" runat="server" Text="Procedure Set" Width="104px" meta:resourcekey="lblHeadingSetResource1"/>
                    </td>
                    <td>
                        <asp:ObjectDataSource ID="ODSHeadingSet" runat="server" OldValuesParameterFormatString="original_{0}"
                            SelectMethod="GetHeadingSetData" TypeName="IPTableAdapters.HeadingSetTableAdapter">
                        </asp:ObjectDataSource>
                        <asp:DropDownList ID="ddlHeadingSet" runat="server" CssClass="required" DataSourceID="ODSHeadingSet"
                            DataTextField="HeadingSet" DataValueField="HeadingSet" OnPreRender="ddlHeadingSet_PreRender"
                            Width="187px" meta:resourcekey="ddlHeadingSetResource1"/>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlHeadingSet"
                            Display="Dynamic" ErrorMessage="Procedure Set is a required field." Width="248px"
                            meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblHeadingCode" runat="server" Text="Procedure Code" Width="104px" meta:resourcekey="lblHeadingCodeResource1"/>
                    </td>
                    <td>
                        <asp:TextBox ID="txtHeadingTemplate" runat="server" CssClass="required"/>
                        &nbsp;
                        <asp:Button ID="btnHeadingTemplateSearch" runat="server" OnClick="btnHeadingTemplateSearch_Click"
                            OnClientClick="window.showModalDialog('FilterHeadingTemplate.aspx', '', 'width=800,height=400,left=400,top=300,dependent=yes,scrollbars=no');"
                            Text="..." CausesValidation="False" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtHeadingTemplate"
                            Display="Dynamic" ErrorMessage="Procedure Code is a required field." Width="249px"
                            meta:resourcekey="RequiredFieldValidator2Resource1"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                        <asp:Label ID="lblSection" runat="server" Text="Section" Width="80px" meta:resourcekey="lblSectionResource1"/>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSection" runat="server" CssClass="required" Width="100px"
                            meta:resourcekey="ddlSectionResource1"/>
                        <!--<asp:TextBox ID="txtSection" runat="server" CssClass="required" meta:resourcekey="txtSectionResource1"
                            Width="28px" Visible="false"></asp:TextBox>-->
                        <asp:TextBox ID="txtSection2" runat="server" Visible="False" Width="27px"/>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddlSection"
                            Display="Dynamic" ErrorMessage="Section is a required field." Width="249px" meta:resourcekey="RequiredFieldValidator3Resource1"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <asp:Button ID="btnNew" runat="server" CssClass="submit" Text="New" OnClick="btnNew_Click"
                            CausesValidation="False" meta:resourcekey="btnNewResource1" />
                        <asp:Button ID="btnModify" runat="server" CssClass="submit" Text="Edit" OnClick="btnModify_Click"
                            CausesValidation="False" meta:resourcekey="btnModifyResource1" />
                        <asp:Button ID="btnSave" runat="server" CssClass="submit" Text="Save" OnClick="btnSave_Click"
                            meta:resourcekey="btnSaveResource1" />
                        <asp:Button ID="btnDelete" runat="server" CausesValidation="False" CssClass="submit"
                            OnClick="btnDelete_Click" Text="Delete" meta:resourcekey="btnDeleteResource1" />
                        <asp:Button ID="btnCancel" runat="server" CssClass="reset" Text="Cancel" OnClick="btnCancel_Click"
                            CausesValidation="False" meta:resourcekey="btnCancelResource1" />
                    </td>
                </tr>
            </table>
            <asp:CheckBox ID="chkForOperation" runat="server" Visible="False" meta:resourcekey="chkForOperationResource1" />
            <asp:CheckBox ID="cbForUpdate" runat="server" Height="2px" Visible="False" Width="121px" meta:resourcekey="cbForUpdateResource1" />
        </fieldset>
        <table width="100%">
            <tr>
                <td align="center">
                    <asp:Label ID="lblError" runat="server" CssClass="error" ForeColor="Red" Width="100%" meta:resourcekey="lblErrorResource1"></asp:Label>
                </td>
            </tr>
        </table>
	    <asp:Panel ID="Panel1" runat="server" meta:resourcekey="Panel1Resource1">
            <asp:GridView CssClass="Grid" ID="gvHST" runat="server" AutoGenerateColumns="False"
                BackColor="#DEBA84" BorderColor="#660000" BorderStyle="Solid" BorderWidth="1px"
                CellPadding="0" CellSpacing="0" DataKeyNames="HeadingSet,HeadingCode,Section"
                DataSourceID="ODSHeadingSetTmplt" EmptyDataText="No Heading Set Template record(s) available."
                OnSelectedIndexChanged="gvHST_SelectedIndexChanged" 
                AllowPaging="True" AllowSorting="True" meta:resourcekey="gvHSTResource1"
                width="100%"
                OnPageIndexChanging="gvHST_PageIndexChanging"
                OnSorting="gvHST_Sorting">
                <Columns>
                    <asp:BoundField DataField="HeadingSet" HeaderText="Procedure Set" ReadOnly="True"
                        SortExpression="HeadingSet" meta:resourcekey="BoundFieldResource1">
                        <ItemStyle HorizontalAlign="Left" Width="100px" Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="HeadingCode" HeaderText="Procedure Code" ReadOnly="True"
                        SortExpression="HeadingCode" meta:resourcekey="BoundFieldResource2">
                        <ItemStyle HorizontalAlign="Left" Width="100px" Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField DataField="HeadingName" HeaderText="Procedure Name" SortExpression="HeadingName" meta:resourcekey="sProcedureName">
                        <ItemStyle HorizontalAlign="Left" Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Section" HeaderText="Section" ReadOnly="True" SortExpression="Section"
                        meta:resourcekey="BoundFieldResource3" Visible="false">
                        <ItemStyle HorizontalAlign="Left" Width="100px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="SectionName" HeaderText="Section" ReadOnly="True" SortExpression="Section"
                        meta:resourcekey="BoundFieldResource3">
                        <ItemStyle HorizontalAlign="Left" Width="100px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CreateBy" HeaderText="Create By" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="center" SortExpression="CreateBy" meta:resourcekey="BoundFieldResource4" />
                    <asp:BoundField DataField="UpdateBy" HeaderText="Update By" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="center" SortExpression="UpdateBy" meta:resourcekey="BoundFieldResource5" />
                    <asp:BoundField DataField="UpdateDate" HeaderText="Update Date" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="False" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="center" SortExpression="UpdateDate" meta:resourcekey="BoundFieldResource5" />
                    <asp:BoundField DataField="OwnerGroupID" HeaderText="OwnerGroupID" SortExpression="OwnerGroupID" Visible="False" meta:resourcekey="BoundFieldResource6" />
                    <asp:CommandField ShowSelectButton="True" HeaderStyle-Width="80" ButtonType="Image" ItemStyle-HorizontalAlign="center" SelectImageUrl="Images/icon-view.jpg" />
                </Columns>
                <HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
                <RowStyle CssClass="GridRowStyle"/>
                <AlternatingRowStyle CssClass="GridAltRowStyle"/>
                <SelectedRowStyle CssClass="GridSelectedRowStyle"/>
                <PagerStyle CssClass="GridPagerStyle" ForeColor="White"/>
                <FooterStyle CssClass="GridFooterStyle"/>
            </asp:GridView>
        </asp:Panel>
    </div>
</asp:Content>

